from LeavingMsg import db
from datetime import datetime


class Messages(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(16))
    body = db.Column(db.String(128))
    timestamp = db.Column(db.DateTime, default=datetime.utcnow)

    def __repr__(self):
        return "<name:{} timestamp:{}>".format(self.name, self.timestamp)
